import request from "@/utils/request";

/**
 * 文章列表
 * @returns {Promise<any>}
 */
export async function getArticleServe(data) {
  return request('/admin/articles',{data})
}
/**
 * 添加文章
 * @returns {Promise<any>}
 */
export async function storeArticleServe(data) {
  return request.post('/admin/articles',{data})
}


/**
 * 编辑文章
 * @returns {Promise<any>}
 */
export async function showArticleServe(params) {
  return request(`/admin/articles/${params}`)
}

/**
 * 更新文章
 * @returns {Promise<any>}
 */
export async function putArticleServe(data,params) {
  return request.put(`/admin/articles/${params}`,{data})
}
